exercise programs I

1.) Save the source of http://www.rebol.com to a file named %rebol.html -- (%http-save.rebol)

2.) Print the greatest of three numbers stored in a, b and c. -- (%abc-max.rebol)

3.) Write a program that repeatedly asks the user for numbers and responds with the newly computed average value. -- (%avg-dlg.rebol)

4.) Write a program that computes the average of a block of numbers. -- (%avg-blk.rebol)

5.) Write a substring function that accepts a string and one paramater, the start offset inside the string. Provide an additional refinement called len to limit the length of the extracted substring. -- (%substr.rebol)

6.) Compute the number of days since your birthday. -- (%age-days.rebol)

7.) Scramble a string using ROT-13. Read the string from a textfile and print the scrambled result to the screen. Used in Newsgroups to prevent accidental reading of content. With ROT-13 characters from A to Z have numbers 1 to 26. When encrypting data, every character is replaced by the character that has its value plus 13 added. So A becomes N. If a value is beyond 26, start again at A. So N (14) plus 13 (27) would be A again. As we see, encryption and decryption is the same in ROT-13. -- (%rot13.rebol)


last update: 28-Jul-2006/2:10:19+2:00
back to index